package tk.heimashuma.store.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import tk.heimashuma.store.entity.Addrs;
import tk.heimashuma.store.entity.Users;

import java.util.List;

public interface AddrRepository  extends JpaRepository<Addrs,Integer> {
    List<Addrs> findAllByUser(Users users);
    @Modifying
    @Query("delete  from Addrs where aid = ?1")
    void deleteAddrById(Integer aid);
}
